import request from "../utils/request";

// 面经详情
export function getArticleList(current, sorter) {
  return request.get("/interview/query", {
    params: {
      current,
      sorter,
    },
  });
}

// 获取单个面经详情
export function getArticleDetail(id) {
  return request.get("/interview/show", {
    params: {
      id,
    },
  });
}

// 收藏 点赞
export function likeOrCollect(id, optType) {
  return request.post("/interview/opt", {
    id,
    optType,
  });
}

// 封装获取 点赞 /收藏 列表
export function getLikeOrCollectList(page, optType) {
  return request.get("/interview/opt/list", {
    params: {
      page,
      optType,
    },
  });
}
